package com.commerceerp.system.mapper;

import com.commerceerp.system.entity.GoodInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GoodMapper {

    List<Map> getAllSystemGood(@Param("goodPlatformSku") String goodPlatformSku,  @Param("goodSystemSku") String goodSystemSku, @Param("goodSystemChname") String goodSystemChname, @Param("goodClass") String goodClass,
                               @Param("goodSellType") String goodSellType, @Param("goodCreateTimePX") Integer goodCreateTimePX, @Param("goodUpdTimePX") Integer goodUpdTimePX, @Param("goodSystemSkuPX") Integer goodSystemSkuPX,
                               @Param("goodPurchasePricePX") Integer goodPurchasePricePX);

    Integer saveNewSystemGood(GoodInfo goodInfo);

    //根据平台id，获取商品ID
    String getGoodIdByPlatformId(@Param("goodPlatformId") String goodPlatformId);

    Integer updPlatformSkuToGood(@Param("goodId")String goodId,@Param("goodPlatformSku")String goodPlatfromSku,@Param("goodPlatformType")String goodPlatformType);

    List<GoodInfo> getNoBundingSystemSku();

    Map<String,Object> getOldPaltformSkuAndType(String goodId);

    Map<String,Object> getGoodInfoByGoodId(String goodId);

    Integer updSystemGoodInfoById(GoodInfo goodInfo);

    Integer delSystemGoodInfoById(String goodId);

    Integer getGsAllNumberIsZero(String goodId);

    List<Map> getAllSystemGoodSKu();

    //获取分类
    List<Map> getCategory(@Param("id") String id);
}
